package com.lizhenhua.orderStatus.controller;

import com.lizhenhua.fmmall.entity.Orders;
import com.lizhenhua.orderStatus.service.UpdateOrderStatusService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class UpdateOrderStatusController {

    @Autowired
    private UpdateOrderStatusService service;

    @PutMapping("/order/status/update")
    public int update(@RequestBody Orders orders){
        System.out.println("-----------执行了 order-status-update  ");

        int i = service.updateStatus(orders);

        System.out.println("------------------------"+i);
        return i;

    }

}
